<?php

/**
 * sfGuardRegisterForm for registering new users
 *
 * @package    sfDoctrineGuardPlugin
 * @subpackage form
 * @author     Jonathan H. Wage <jonwage@gmail.com>
 * @version    SVN: $Id: BasesfGuardChangeUserPasswordForm.class.php 23536 2009-11-02 21:41:21Z Kris.Wallsmith $
 */
class sfGuardRegisterFormExtraField extends BaseForm
{
  /**
   * @see sfForm
   */
  public function configure()
  {        
      $this->disableLocalCSRFProtection();
        //$this->useFields(array('birth_year'));  
        $daty_ur = array();
        $daty_ur[] = '';
        for ($i=2010; $i>=1910; $i--)
        {
            $daty_ur[$i] = $i;
        }
        $this->setWidget(
                'birth_year', new sfWidgetFormSelect(
                    array('choices' => $daty_ur),
                    array('label' => 'Rok urodzenia:')
                )
        );
        
        $this->setWidget(
                'location', new sfWidgetFormInput(
                    array('label'=>'Lokalizacja:'), 
                    array('size'=>'25')
                )
        );

        
        
        $this->setWidget(
                'sex', new sfWidgetFormSelectRadio(
                    array('choices' => array('M' => 'Mężczyzna', 'K' => 'Kobieta')),                
                    array('label'=>'Płeć:')    
                )
        );
    $this->setDefaults(array(
        'sex' => 'M',
        'birth_year' => '1980'
    ));
        
  }
  
}